package com.nanrui.mutualinductor.ui.page;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.batman.baselibrary.base.BaseActivity;
import com.batman.baselibrary.utils.ActivityUtils;
import com.batman.baselibrary.utils.TimeUtils;
import com.nanrui.mutualinductor.R;
import com.ui.widget.UINavigationView;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import butterknife.BindView;
import butterknife.OnClick;

public class ElecCheckActivity extends BaseActivity {

    @BindView(R.id.uinv)
    UINavigationView mUinv;

    @BindView(R.id.btn_1)
    Button mBtn1;
    @BindView(R.id.btn_2)
    Button mBtn2;

    @BindView(R.id.tv_date)
    TextView mTvDate;
    @BindView(R.id.btn_exit)
    Button mBtnExit;

    @Override
    protected boolean isRegisterEventBus() {
        return false;
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_elec_check;
    }

    @Override
    public void initViews() {
        mUinv.setNavigationTitle("电磁式电压互感器现场测试");
        mTvDate.setText("时间：" + TimeUtils.date2String(new Date(), new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())));
    }

    @Override
    public void loadData(Bundle savedInstanceState) {

    }

    @OnClick({R.id.btn_1, R.id.btn_2,R.id.btn_exit})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_1:
                ActivityUtils.openActivity(mContext, CTCheckRegulationActivity.class);

                break;
            case R.id.btn_2:
                ActivityUtils.openActivity(mContext, ElecCheckTrRateActivity.class);

                break;
            case R.id.btn_exit:
                finish();
                break;
        }
    }
}
